package com.wj.szcrm.controller;

import com.wj.szcrm.model.MonthIncome;
import com.wj.szcrm.service.ICourseOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author: WangJin
 * @description
 * @date: 2021/9/16 16:17
 */
@Controller
@RequestMapping("dataanalysis")
public class DataAnalysisController {

    @Autowired
    ICourseOrderService orderService;

    @RequestMapping("income")
    public String income(){
        return "dataanalysis/income";
    }

    @RequestMapping("monthIncomes")
    @ResponseBody
    public List<MonthIncome> monthIncomes(){
        List<MonthIncome> list = orderService.getMonthIncomes();
        return list;
    }

}
